package com.xiaodu.acer.phoneplay.widget;

import android.content.Context;
import android.graphics.Typeface;
import android.support.annotation.Nullable;
import android.util.AttributeSet;

/**
 * @author 小杜
 *         邮箱:m15701207383@163.com
 * @version V1.0
 * @Description: ${TODO}(用一句话描述该文件做什么)
 * @date 2018/1/17 10:43
 */
public class IconFontTextView extends android.support.v7.widget.AppCompatTextView {
    public IconFontTextView(Context context) {
        super(context);
        init(context);
    }
    public IconFontTextView(Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
        init(context);
    }
    public IconFontTextView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        init(context);
    }
    private void init(Context context) {
        Typeface iconfont = Typeface.createFromAsset(context.getAssets(), "iconfont.ttf");
        setTypeface(iconfont);
    }

}
